package dao

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsName  string  `json:"goodsName" gorm:"type:varchar(30);not null;comment:'商品名称'"`
	GoodsPrice float64 `json:"goodsPrice" gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	GoodsImg   string  `json:"goodsImg" gorm:"type:varchar(100);not null;comment:'商品图片'"`
	GoodsNum   int     `json:"goodsNum" gorm:"type:int(10);not null;comment:'商品数量'"`
}
type Orders struct {
	gorm.Model
	OrderSn     string  `json:"orderSn" gorm:"type:varchar(30);not null;comment:'订单编号'"`
	UserId      int     `json:"userId" gorm:"type:int(10);not null;comment:'用户id'"`
	OrderStatus int     `json:"orderStatus" gorm:"type:int(2);not null;comment:'订单状态'"`
	PayStatus   int     `json:"payStatus" gorm:"type:int(2);not null;comment:'支付状态'"`
	GoodsName   string  `json:"goodsName" gorm:"type:varchar(30);not null;comment:'商品名称'"`
	GoodsPrice  float64 `json:"goodsPrice" gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	GoodsImg    string  `json:"goodsImg" gorm:"type:varchar(100);not null;comment:'商品图片'"`
	GoodsNum    int     `json:"goodsNum" gorm:"type:int(10);not null;comment:'商品数量'"`
	OrderAmount float64 `json:"orderAmount" gorm:"type:decimal(10,2);not null;comment:'订单总价'"`
}
